package com.springboot.mall.model.mappers;

import com.springboot.mall.model.entity.Product;
import com.springboot.mall.model.query.ProductListQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductMapper {
    Product selectByName(String name);
    int insertSelective(Product record);
    int updateByPrimaryKeySelective(Product product);
    int deleteByPrimaryKey(Integer id);
    Product selectByPrimaryKey(Integer id);
    int batchUpdateSellStatus(@Param("ids") Integer[] ids,@Param("sellStatus") Integer sellStatus);
    List<Product> selectListForAdmin();
    List<Product> selectList(@Param("productListQuery")ProductListQuery productListQuery);

}
